package KK.net.Proxy
{
	import KK.Global.Game;
	import KK.net.Command.CommandID;
	import KK.net.ProxyManager;
	
	import Protocol.SLogin;
	
	import flash.utils.ByteArray;

	public class C_LoginProxy extends Proxy implements IProxy
	{
		public function C_LoginProxy()
		{
			//TODO: implement function
			init();
		}
		/**
		 * 初始化  
		 * 
		 */
		private function init():void{
			ProxyManager.RegisterProgress(CommandID.IC_LOGIC_LOGIN,onLogicLogin);
			ProxyManager.RegisterProgress(CommandID.IC_LOGIN,onLogin);
		}
		
		/**
		 * 处理登陆  
		 * 
		 */
		public function onLogin():void{
			var login:SLogin=new SLogin();
			login.userName=Game.OpenID;/*
			var byte:ByteArray=new ByteArray();
			login.Serialize(byte);
			Send(byte);*/
		}
		
		/**
		 * 逻辑登陆  
		 * 
		 */
		public function onLogicLogin():void{
			
		}
	}
}